'use strict';
const {
  Model
} = require('sequelize');
module.exports = (sequelize, DataTypes) => {
  class Login extends Model {
    /**
     * Helper method for defining associations.
     * This method is not a part of Sequelize lifecycle.
     * The `models/index` file will call this method automatically.
     */
    static associate(models) {
      // define association here
    }
  }
  Login.init({
    admin_name: DataTypes.STRING,
    admin_password: DataTypes.STRING(32)
  }, {
    sequelize,
    // 由于模型名称和表名不是复数的关联关系，此时需要设置真正的表名
    tableName:'admin',
    modelName: 'Login'
  });
  return Login;
};